package com.TeacherInfoServer.common.service;

import com.TeacherInfoServer.pojo.DTO.PositionHistoryDTO;
import com.TeacherInfoServer.pojo.DTO.SearchDTO.PositionHistorySearchDTO;
import com.TeacherInfoServer.pojo.entity.PositionHistory;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

public interface PositionHistoryService extends IService<PositionHistory> {
    Map<String,Object> getPositionList(Integer pages, Integer size);

    List<PositionHistoryDTO> getPositionHistoryDTOS();


    Map<String,Object> searchPositionHistoryList(PositionHistorySearchDTO positionHistorySearchDTO);

    @Transactional
    void addPositionHistory(String departmentName, String teacherName, String startDate, String endDate, String positionType);

    @Transactional
    void addPositionHistoryByDTO(PositionHistoryDTO positionHistoryDTO);

    @Transactional
    void updatePositionHistory(PositionHistoryDTO positionHistoryDTO);

    @Transactional
    boolean deletePositionHistory(List<Long> ids);
}
